# the minimum version of CMake.
cmake_minimum_required(VERSION 3.4.1)
project(myNpmLib)

set(NATIVERENDER_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR})
add_definitions(-DOHOS_PLATFORM)

if(DEFINED PACKAGE_FIND_FILE)
    include(${PACKAGE_FIND_FILE})
endif()

include_directories(${NATIVERENDER_ROOT_PATH}
                    ${NATIVERENDER_ROOT_PATH}/include)


add_library(common SHARED model/ui/napi_arkui.cpp
                          model/ui/node/node_manager.cpp
                          napi_init.cpp)

#[[添加SDK中HMOS的Native so库路径]]
target_include_directories(common PUBLIC ${HMOS_SDK_NATIVE}/sysroot/usr/include)
target_link_directories(common PUBLIC ${HMOS_SDK_NATIVE}/sysroot/usr/lib/aarch64-linux-ohos)

target_link_libraries(common PUBLIC libace_napi.z.so libhilog_ndk.z.so)
target_link_libraries(common PUBLIC libnative_drawing.so)
target_link_libraries(common PUBLIC libace_ndk.z.so)
